#ifndef CPP_WAKELOCK_H
#define CPP_WAKELOCK_H

//@brief 唤醒锁
//@author cvte
//@description 唤醒锁模块
class WakeLock {
   public:
    friend class PowerManager;

    WakeLock(int level, const char* name);
    ~WakeLock();

    void acquire();
    void release();
    bool isAcquired();
    int getLevel();
    const char* getName();

   private:
    char mName[64];
    bool mIsAcquired = false;
    int mLevel = 0;
};

#endif